<template>
  <div class="pdf-box">
    <iframe class="prism-player" :src="pdfUrl" width="100%" height="100%"></iframe>
  </div>
</template>
<script>
export default {
  data () {
    return {
      pdfUrl:"",
    }
  },
  mounted() {
    if(this.$route.query.tem == 1){
      // 开具证明
      var  _url = conf.urlPrefix + '/dafwgl/wjscxz/fjxz?id=' + this.$route.query.id.kjzmid
    }else if(this.$route.query.tem == 2){
      // 附件
      var _url = conf.urlPrefix + '/dafwgl/wjscxz/fjxz?fwznFjid='+this.$route.query.id.fjid
    }
    // this.pdfUrl = `/static/pdf/web/viewer.html?file=${encodeURIComponent(_url)} `
    this.pdfUrl = `./static/pdf/web/viewer.html?file=${encodeURIComponent(_url)} `
  }
}
</script>
<style lang="scss" scoped>
 .pdf-box {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: .28rem;
    span {
      width: 100%;
    }
  }
</style>
